#!/bin/bash
set -e

cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
export readonly ARCH=${1:-amd64}
export readonly NAME=${2:-$(basename "${PWD%/*}")}
export readonly VERSION=${3:-$(basename "$PWD")}

mkdir -p manifests
wget -q -N -P manifests/ https://mirror.ghproxy.com/https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/${VERSION}/doc/crds/daemonset-install.yaml
wget -q -N -P manifests/ https://mirror.ghproxy.com/https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/${VERSION}/doc/crds/whereabouts.cni.cncf.io_ippools.yaml
wget -q -N -P manifests/ https://mirror.ghproxy.com/https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/${VERSION}/doc/crds/whereabouts.cni.cncf.io_overlappingrangeipreservations.yaml

